<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" class="m-all">
<head>
    <title>预览界面</title>
    <link rel="stylesheet" th:href="@{/lib/danmuPlayer/css/scojs.css}">
    <link rel="stylesheet" th:href="@{/lib/danmuPlayer/css/colpick.css}">
    <link rel="stylesheet" th:href="@{/lib/danmuPlayer/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/lib/danmuPlayer/css/main.css}">
    <script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
</head>

<body>
<div id="danmup"> </div>

<script th:src="@{/lib/danmuPlayer/js/jquery.shCircleLoader.js}"></script>
<script th:src="@{/lib/danmuPlayer/js/sco.tooltip.js}"></script>
<script th:src="@{/lib/danmuPlayer/js/colpick.js}"></script>
<script th:src="@{/lib/danmuPlayer/js/jquery.danmu.js}"></script>
<script th:src="@{/lib/danmuPlayer/js/main.js}"></script>
<script th:inline="javascript">
    $("#danmup").DanmuPlayer({
        src: [[${post.videoUrl}]],
        height: "520px", //区域的高度
        width: "100%" //区域的宽度
        //, urlToGetDanmu: "/admin/files/getDanmuList?postId=[[${post.id}]]"
        , urlToPostDanmu: "/admin/files/postDanmu?postId=[[${post.id}]]&userId=32"
    });
    var danmus = [[${post.danmus}]];

    $("#danmup .danmu-div").danmu("addDanmu",danmus);

</script>

</body>

</html>